<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/piaoyi.tld" prefix="piaoyi"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>票易信息管理系统</title>
<link rel="stylesheet" href="/css/admin.css" type="text/css"/>
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
</head>
<body leftmargin="2" topmargin="2">
<fieldset><legend>票务管理-查询参数选择：</legend>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr class="tdbg3" align="left"> 
	<form name="add" id="add" method="get" action="admin_goods.action">
   	 <td>
	 &nbsp;名称:<s:textfield name="name" id="name" size="20"/>&nbsp;
	 类别:
	 <s:select list="categoryList" name="category" id="category" listKey="key" listValue="value"></s:select>
	 显示:
	 <s:select list="isShowList" name="isShow" id="isShow" listKey="key" listValue="value"></s:select>&nbsp;
	 状态:
	 <s:select list="stateList" name="state" id="state" listKey="key" listValue="value"></s:select>
	<input value="查询" type="submit" /> 
	 </td>
	 </form>
    </tr>
</table>
</fieldset>

<s:url action="admin_goods?action=add" id="goodsaddurl" />
<fieldset><legend>票务管理：[<a href="${goodsaddurl}">添加票务</a>]</legend>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <COLGROUP>
  <COL width="*" />
  <COL width="100" />
  <COL width="100" />
  <COL width="100" />
  <COL width="300" />
  <tr style="font-weight: bold;" align="center" class="tdbg2"> 
    <td>名称</td>
    <td>显示</td>
    <td>状态</td>
    <td>排序</td>
    <td>管理操作</td>
  </tr>
<s:iterator id="g" value="%{pageList.objectList}" status="st" >
<s:url action="admin_goods?action=del&id=${g.id}" id="goodsdelurl" />
<s:url action="admin_goods?action=update&id=${g.id}" id="goodsupdateurl" />
<s:url action="admin_daily?goodsId=${g.id}" id="dailyurl" />
    <tr class="tdbg3" align="center"> 
      <td><s:property value="#g.name"/></td>
      <td>
      <s:if test="#g.isShow==0">
      	隐藏
      </s:if>
      <s:if test="#g.isShow==1">
      	激活
      </s:if>
      </td>
      <td>
      <s:if test="#g.state==0">
      	预售中
      </s:if>
      <s:if test="#g.state==1">
      	售票中
      </s:if>
      </td>
      <td>
      <s:property value="#g.orders"/>
      </td>
      <td>
      <a href="${goodsupdateurl}">修改</a> | 
      <a href="${goodsdelurl}" onclick="{if(confirm('执行此删除操作后该信息不能恢复，确定删除吗？')){return true;}return false;}">删除</a> | 
      <a href="${dailyurl}">场次操作</a>
      </td>
    </tr>
</s:iterator>
<tr align="center" class="tdbg2"> 
   <td colspan="5"><piaoyi:pages value="%{pageList.pages}"/></td>
</tr>
</table>
</fieldset>
</body>
</html>
